package net.csdra.libraryborrowing.service.book;

import net.csdra.libraryborrowing.domain.book.BookInfo;
import net.csdra.libraryborrowing.domain.book.BookInfoRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by xiaomi on 2017/10/17.
 */
@Component
public class BookInfoComponentImpl implements BookInfoComponent {

    @Autowired
    BookInfoRepository bookInfoRepository;

    @Override
    public BookInfo getBookInfoById(GetBookInfoById getBookInfoById) {
        BookInfo bookInfo = bookInfoRepository.findOne(getBookInfoById.getBookInfoId());
        return bookInfo;
    }
}
